<?php

namespace Users\Form;
use Zend\InputFilter\InputFilter;

class RegisterFilter extends InputFilter{
    
    public function __construct(){
	$this->add(array(
	    'name' => 'email' ,
	    'required' => true ,
	    'validatiors' => array(
		array(
		    'name'	=> 'EmailAddress',
		    'options' 	=> array(
			'domain' 	=> true,
		    ),
		),

	    ),
	));
	
	$this->add(array(
	    'name' => 'name' ,
	    'required' => true ,
	    'filters' => array(
		array(
		    'name'	=> 'StripTags',
		    'options' 	=> array(
			'domain' 	=> true,
		    ),
		),

	    ),
	    'validators' => array(
		array(
		    'name' => 'StringLength',
		    'options' => array(
			'encoding' 	=> 'UTF-8',
			'min'		=> 2,
			'max'		=> 140,

		    ),
		),
	    ),
	));
	
	$this->add(array(
	    'name' => 'password' ,
	    'required' => true ,	    
	));
	
    }
}
